﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace GFC
{
    public class FormatParser
    {
        private BinaryReader m_Stream;
        private Format m_Format;

        public Format Format
        {
            get { return m_Format; }
        }
    
        public FormatParser(Format format)
        {
            this.m_Format = format;
            this.m_Stream = null;
        }

        public List<ParsedFrame> Parse(BinaryReader stream)
        {
            this.m_Stream = stream;

            return null;
        }

        protected FieldValue ParseField(Field field)
        {
            /*
             * Check conditions, return null if false
             */

            /*
             * Read data and parse it, create FieldValue of type FieldType
             */ 
 
            return null;
        }
    }
}
